Skip to content

Conversation

Gankra
Copy link
Contributor

@Gankra Gankra commented Jun 18, 2025

Update the bundled musl library from 1.2.3 to the 1.2.5 release from February 29, 2024.


This is a rebase of

Which removes the second speculative commit which ended up not panning out.

I've added my own second commit that updates all other places I could find that referenced musl 1.2.3 in the codebase.

try-job: dist-x86_64-musl
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-x86_64-linux

@rustbot
Copy link
Collaborator

rustbot commented Jun 18, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 18, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

@Gankra
Copy link
Contributor Author

Gankra commented Jun 18, 2025

The previous PR stalled out on concerns of ecosystem breakage, but see this comment for @est31 concluding we can move forward without further mitigation: #125692 (comment)

@Gankra
Copy link
Contributor Author

Gankra commented Jun 18, 2025

I would like to nominate this for FCP or whatever the current process is to land these kinds of major toolchain changes.

Landing this update is expected to resolve ongoing issues in the ecosystem with rootless docker images.

I've also drafted a rust-lang blogpost announcing this change (based on the previous musl update's post).

@jieyouxu
Copy link
Member

jieyouxu commented Jun 18, 2025

The process for bumping the target baseline of Tier 2 targets is currently a Major Change Proposal + FCP (see Changing target baseline (e.g. minimum Darwin or Windows version bump) part). If you draft an MCP, I'll help with the notifying relevant target maintainers part.

Changing target baseline (e.g. minimum Darwin or Windows version bump)

  • Propose using: MCP
  • Approve using: FCP
  • Write an MCP describing why the target should have a change of baseline and once discussion has concluded, an FCP can be started to approve the change of baseline.

@jieyouxu jieyouxu added the needs-mcp This change is large enough that it needs a major change proposal before starting work. label Jun 18, 2025
@jieyouxu
Copy link
Member

r? @wesleywiser (since you've reviewed the previous attempt)

@Gankra
Copy link
Contributor Author

Gankra commented Jun 18, 2025

I have filed an MCP:

@jieyouxu jieyouxu removed the needs-mcp This change is large enough that it needs a major change proposal before starting work. label Jun 18, 2025
@est31 est31 added the relnotes Marks issues that should be documented in the release notes of the next release. label Jun 18, 2025
@Noratrieb Noratrieb added the T-release Relevant to the release subteam, which will review and decide on the PR/issue. label Jun 18, 2025
@workingjubilee
Copy link
Member

Building host compiler plus musl stds for crater run.

@bors try

bors added a commit that referenced this pull request Jun 19, 2025
Update bundled musl to 1.2.5

Update the bundled musl library from 1.2.3 to the 1.2.5 release from February 29, 2024.

[musl releases page](https://musl.libc.org/releases.html)

Prior update: #107129

MCP for this change: rust-lang/compiler-team#887

--------

This is a rebase of

* #125692

Which removes the second speculative commit which ended up not panning out.

I've added my own second commit that updates all other places I could find that referenced musl 1.2.3 in the codebase.

try-job: dist-x86_64-musl
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-x86_64-linux
@bors
Copy link
Collaborator

bors commented Jun 19, 2025

⌛ Trying commit 1926e11 with merge 1271e16...

@bors
Copy link
Collaborator

bors commented Jun 19, 2025

💥 Test timed out

@rust-log-analyzer

This comment has been minimized.

@workingjubilee
Copy link
Member

@bors2 delegate=try

@rust-bors
Copy link

rust-bors bot commented Jun 19, 2025

@Gankra can now perform try builds on this pull request

@Gankra

This comment was marked as outdated.

@rustbot

This comment has been minimized.

@Gankra
Copy link
Contributor Author

Gankra commented Oct 2, 2025

I've rebased the PR and I think I've fixed:

Just FYI, this pull request effectively only changes the musl version in the musl-cross-make script (which is only used by aarch64 and x86_64), the crosstool-ng configs used by all the other targets still need updating.

In particular we're currently on crosstool-ng 1.27 which defaults to musl 1.2.5, so all that needed to be changed was to remove explicit opt-outs for that version. The only opt-out I could find was for powerpc64le-unknown-linux-musl.

@Gankra Gankra force-pushed the update_musl_1.2.5 branch from 0430c86 to 52513ab Compare October 3, 2025 14:01
@rustbot
Copy link
Collaborator

rustbot commented Oct 3, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@wesleywiser
Copy link
Member

If we could get crater to cooperate, that would be great (and I think it seemed to work when I bumped musl last time):

@craterbot run mode=build-and-test name=musl_upgrade_1_2_5_with_getrandom_patch_2 start=try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl end=try#c066bf6804adc55193b71afdff6a56922f4a8689+target=x86_64-unknown-linux-musl+patch=getrandom=https://github.com/rust-random/getrandom=backports/v0.2
crates=https://gist.githubusercontent.com/workingjubilee/075aa4757096ce213b76d576f2f92742/raw/197ec4b1e9a09e208b6863172f6a1e9baceaa842/musl-1_2_5-retry-list-4.txt

@craterbot
Copy link
Collaborator

👌 Experiment musl_upgrade_1_2_5_with_getrandom_patch_2 created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 6, 2025
Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me, just a few small comments.

View changes since this review

@Gelbpunkt
Copy link
Contributor

Gelbpunkt commented Oct 6, 2025

In particular we're currently on crosstool-ng 1.27 which defaults to musl 1.2.5, so all that needed to be changed was to remove explicit opt-outs for that version

I'd recommend still pinning the musl version explicitly so that another crosstool-ng update doesn't unintentionally bump musl to future releases. Effectively, all but 3 targets are now already using 1.2.5 even though that wasn't intended. Pinning the version like is currently done for ppc64le would prevent this.

@Gankra
Copy link
Contributor Author

Gankra commented Oct 7, 2025

I'd recommend still pinning the musl version explicitly so that another crosstool-ng update doesn't unintentionally bump musl to future releases. Effectively, all but 3 targets are now already using 1.2.5 even though that wasn't intended. Pinning the version like is currently done for ppc64le would prevent this.

done

@rust-log-analyzer

This comment has been minimized.

@craterbot
Copy link
Collaborator

🚧 Experiment musl_upgrade_1_2_5_with_getrandom_patch_2 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment musl_upgrade_1_2_5_with_getrandom_patch_2 is completed!
📊 11216 regressed and 169 fixed (712125 total)
📊 88679 spurious results on the retry-regessed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/musl_upgrade_1_2_5_with_getrandom_patch_2/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Oct 8, 2025
@Gankra
Copy link
Contributor Author

Gankra commented Oct 8, 2025

Anything else that needs to be done to merge this?

@wesleywiser wesleywiser removed T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. labels Oct 9, 2025
@wesleywiser
Copy link
Member

Looking a few of the random failures, all are related to the (now missing) open64 symbol however, cargo update && cargo build succeeds as newer getrandom and libc libraries resolve this issue. At this point, I don't see any reason to delay this update to wait for more of the ecosystem to update as many of the regressed crates seem to be completely inactive or abandoned.

@rfcbot fcp merge

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Oct 9, 2025

Team member @wesleywiser has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. needs-crater This change needs a crater run to check for possible breakage in the ecosystem. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.